<template>
  <div>
    <a-table
      class="FromList"
      :columns="columns"
      :data-source="this.CommentMockArray"
      :scroll="{ x: 1450, y: 300 }"
      style="marginLeft: 30px"
    >
      <template #bodyCell="{ column }">
        <template v-if="column.key === 'operation'">
          <a>action</a>
        </template>
      </template>
    </a-table>
  </div>
</template>

<script>
import Axios from "axios";

export default {
  data() {
    return {
      columns: [
        {
          title: "状态",
          width: 100,
          dataIndex: "name",
          key: "name",
          fixed: "left",
        },
        {
          title: "称呼",
          width: 100,
          dataIndex: "age",
          key: "age",
          fixed: "left",
        },
        {
          title: "联系方式",
          dataIndex: "address",
          key: "1",
          width: 150,
        },
        {
          title: "原始内容",
          dataIndex: "address",
          key: "2",
          width: 150,
        },
        {
          title: "HTML内容",
          dataIndex: "address",
          key: "3",
          width: 150,
        },
        {
          title: "管理文章",
          dataIndex: "address",
          key: "4",
          width: 150,
        },
        {
          title: "创建时间",
          dataIndex: "address",
          key: "5",
          width: 150,
        },
        {
          title: "父级评论",
          dataIndex: "address",
          key: "6",
          width: 150,
        },
        {
          title: "操作",
          dataIndex: "address",
          key: "7",
          width: 150,
        },
      ],
      CommentMockArray:[]
    };
  },
  created() {
      this.CommentMockFunc()
  },
  methods: {
      async CommentMockFunc(){
          let res = await Axios.get("/api/getMock");
          this.CommentMockArray = res.data.ddata
      }
  },
  components: {
      
  },
};
</script>
<style>
.FromList {
  width: 96%;
  height: auto;
}
</style>